//    Copyright (C) Kherty.  All rights reserved.
namespace OpenLS.Spreadsheet.Extensibility
{
    public class AllowDoubleToIntegerConversionAttribute : ParameterConverterAttribute
    {
        internal override void ConvertImp(ConversionData data)
        {
            if ((data.TargetType == typeof(int) || data.TargetType == typeof (int?)) && data.Value is double)
                data.Result = (int)(double)data.Value;  //\\OK?
        }
    }
}